<?php if ($this->pageCount): ?>
    <div class="pagination">
        <ul>

            <!-- Previous page link -->
            <?php if (isset($this->previous)): ?>
                <li class="prev"><a href="<?php echo $this->url(array('page' => $this->previous)); ?>">&larr; Previous</a></li>
            <?php else: ?>
                <li class="prev disabled"><a href="#">&larr; Previous</a></li>
            <?php endif; ?>


            <!-- Numbered page links -->
            <?php foreach ($this->pagesInRange as $page): ?>
                <?php if ($page != $this->current): ?>
                    <li>
                        <a href="<?php echo $this->url(array('page' => $page)); ?>">
                            <?php echo $page; ?>
                        </a>
                    </li>
                <?php else: ?>
                    <li class="active">
                        <a href="#"><?php echo $page; ?></a>
                    </li>
                <?php endif; ?>
            <?php endforeach; ?>


            <!-- Next page link -->
            <?php if (isset($this->next)): ?>
                <li class="next"><a href="<?php echo $this->url(array('page' => $this->next)); ?>">Next &rarr;</a></li>
            <?php else: ?>
                <li class="next disabled"><a href="#">Next &rarr;</a></li>
            <?php endif; ?>

        </ul>
    </div>
<?php endif; ?>